import request from '@/utils/request'

//根据身份证查询患病历史
export function historyInfo(id) {
  return request({
    url: '/patient_illness_info/info/patient_category',
    method: 'get',
    params: id
  })
}

// 查询患者患病信息列表
export function listInfo(query) {
  return request({
    url: '/patient_illness_info/info/list',
    method: 'get',
    params: query
  })
}

// 查询患者患病信息详细
export function getInfo(patientId) {
  return request({
    url: '/patient_illness_info/info/' + patientId,
    method: 'get'
  })
}

// 新增患者患病信息
export function addInfo(data) {
  return request({
    url: '/patient_illness_info/info',
    method: 'post',
    data: data
  })
}

// 修改患者患病信息
export function updateInfo(data) {
  return request({
    url: '/patient_illness_info/info',
    method: 'put',
    data: data
  })
}

// 删除患者患病信息
export function delInfo(patientId) {
  return request({
    url: '/patient_illness_info/info/' + patientId,
    method: 'delete'
  })
}
